@import 'resets';
@import 'github';
@import 'nprogress';
@import 'vars';
@import 'flex';

/* 文章内容 markdown 格式 */
.post-content {
  word-wrap: break-word;

  p, div, code, pre, ol, ul, h2 {
    margin-bottom: 15px;
  }

  i {
    font-style: italic;
  }

  img {
    width: 100%;
  }

  pre {
    display: flex;
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    border-radius: 3px;
    line-height: 17.4px;
    font-size: 12px;
    padding: 16px;
    background-color: #f7f7f7;
    overflow-x: auto;
    code {
      padding: 0;
      border: none;
      display: inline;
    }
  }

  code {
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    background-color: #f7f7f7;
    padding: 0 5px;
    border-radius: 2px;
    padding-top: 2px;
    border: 1px solid #ccc;
    margin: 0 2px;
  }

  h2, h3, h4 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
  }

  h3 {
    font-size: 1.25em;
  }

  h4 {
    font-size: 1em;
  }

  hr {
    border: 1px solid #ededed;
    margin-bottom: 10px;
  }
}

/* 主体部分布局 */
.content-wrapper {
  padding-top: 15px;
  padding-bottom: 15px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.sidebar {
  margin-left: 5px;
  width: 250px;
}

/* 内容块样式 */
.main {
  max-width: 700px;
  width: 95%;
  border: @seperator;
  background-color: white;
}

/* 文章列表项样式 */
.postSummary {
  padding: 0 10px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;;
  .postSummary__upstairs {
    display: flex;
    padding-top: 10px;
    flex: 1;
    align-items: center;
    .postCover {
      display: flex;
      background-color: #f7f7f7;
      justify-content: center;
      align-items: center;
      height: 110px;
      color: #CCCCCC;
      font-size: 12px;
      border: 0.5em #fff solid;
      box-shadow: rgba(0,0,0,0.15) 0 1px 4px;
      width: 180px;
      background-size: cover;
      margin: 1px 10px 1px 1px;
    }
    .postTitleAndContent {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-self: stretch;
      h1 {
        margin-bottom: 5px;
        font-size: 20px;
        line-height: 25px;
      }
      p {
        display: flex;
        flex: 1;
        font-size: 13px;
        line-height: 20px;
        align-items: center;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
  .postSummary__downstairs {
    display: flex;
    padding-left: 4px;
    height: 40px;
    align-items: center;
  }
  border-bottom: @seperator;
}

/* Page Header */
.header {
   display: flex;
   alignItems: stretch;
   background: #1b1920;
   padding: 0 45px;
   height: 66px;
}

/* post wrapper */
.post-wrapper {
  line-height: 1.4rem;
  font-size: 14px;
}

/* profile */
.profile {
  background-color: #ffffff;
  border: @seperator;
  .profile__basic {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: @seperator;
    .profile__name {
      margin: 10px 0;
    }
    .profile__signature {
      font-size: 13px;
      color: #9D9D9D;
      font-style: italic;
    }
  }
  .profile__sns {
    display: flex;
    padding: 8px 20px;
    justify-content: space-around;
  }
}

.pagination {
  display: flex;
  list-style: none;
  flex-direction: row;
  justify-content: space-between;
  font-size: 14px;
  padding: 0px 20px;
  flex-wrap: wrap;
  margin: 10px 0;
  li {
    cursor: pointer;
    display: flex;
    align-items: center;
    margin: 5px 0;
    &:not(.break) {
      a {
        display: inline-block;
        border: @seperator;
        border-radius: 3px;
        padding: 8px 10px;
        outline: none;
      }
    }
    &.selected, &.disabled {
      a {
        color: #cccccc;
      }
    }
  }
}

/* 响应式内容 */
@media (max-width: 414px) {
  .main {
    width: 100%;
  }
  .postCover {
    display: none!important;
    width: 0px!important;
    margin: 0!important;
    padding: 0!important;
    border: none!important;
  }
}

@media (max-width: 500px) {
  .header {
    padding: 0 5px;
  }
}

@media (max-width: 600px) {
  .sidebar {
    display: none;
  }
}
